package com.heima.search.model;

import java.util.HashMap;
import java.util.Map;

public class TrieNode {
    public char var; //节点数据值
    public boolean isWord; //是否为字
    public Map<Character,TrieNode> children = new HashMap<>(); //记录下一个节点
    public boolean containLongTail = false;
    public TrieNode(){}
    public TrieNode(char c){
        TrieNode node = new TrieNode();
        node.var = c;
    }

    @Override
    public String toString() {
        return "TrieNode{" +
                "var=" + var +
                ", isWord=" + isWord +
                ", children=" + children +
                ", containLongTail=" + containLongTail +
                '}';
    }
}